﻿@model CodingWiki_Model.Models.BookDetail
@{
    var title = "Book Details";
}
<form method="post">
    <div class="row p-3 border">
        <div asp-validation-summary="ModelOnly" class="text-danger"></div>
        <input type="hidden" asp-for="Book_Id" />
        <input type="hidden" asp-for="BookDetail_Id" />

        <div class="col-12 border-bottom">
            <h2 class="text-primary">@title</h2>
        </div>
        <div class="col-8 pt-4">
            <div class="form-group row py-2">
                <div class="col-4">
                    <label asp-for="Book.Title"></label>
                </div>
                <div class="col-8">
                    <input asp-for="Book.Title" disabled class="form-control" />
                </div>
            </div>
            <div class="form-group row py-2">
                <div class="col-4">
                    <label asp-for="NumberOfChapters"></label>
                </div>
                <div class="col-8">
                    <input asp-for="NumberOfChapters" class="form-control" />
                    <span asp-validation-for="NumberOfChapters" class="text-danger"></span>
                </div>
            </div>
            <div class="form-group row py-2">
                <div class="col-4">
                    <label asp-for="NumberOfPages"></label>
                </div>
                <div class="col-8">
                    <input asp-for="NumberOfPages" class="form-control" />
                    <span asp-validation-for="NumberOfPages" class="text-danger"></span>
                </div>
            </div>
            <div class="form-group row py-2">
                <div class="col-4">
                    <label asp-for="Weight"></label>
                </div>
                <div class="col-8">
                    <input asp-for="Weight" class="form-control" />
                    <span asp-validation-for="Weight" class="text-danger"></span>
                </div>
            </div>

            <div class="form-group row py-2">
                <div class="col-4 offset-4">
                    <button type="submit" class="btn btn-primary form-control">Update</button>
                </div>
                <div class="col-4">
                    <a asp-action="Index" class="btn btn-success form-control">Back to List</a>
                </div>
            </div>
        </div>
    </div>
</form>

@section Scripts {
    <partial name="_ValidationScriptsPartial" />

}